var onlineMusic = angular.module('onlineMusic', []);

onlineMusic.controller('search', ['$scope', '$http',
  function ($scope, $http) {
    
    $scope.search_results;   
    $scope.search_query = '';
    
    
     $scope.loadResults = function(q) {
      $http.get('api/search/'+q).success(function(data) {
        $scope.search_results = data;
      });
    }
    
}]);